﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace XingFuStudio.Pioneer.Applications.City.Element {
    /// <summary>
    /// 元素工厂
    /// </summary>
    public static class ElementFactory {


        /// <summary>
        /// 获取元素信息类
        /// </summary>
        /// <param name="elClass"></param>
        /// <returns></returns>
        public static CityElement CreateElement(string elClass) {
            
            switch (elClass) {
                case "CResidence":
                case "CResidenceRelation":
                    return new ResidenceInfo();
                case "CBusiness":
                case "CBusinessAmphibious":
                    return new BusinessInfo();
                case "CFarmLand":
                case "CFarmLot":
                    return new AgricultureInfo();
                case "CDecotration":
                    return new DecotrationInfo();
                case "CShip":
                    return new ShipInfo();
                case "CDock":
                    return new Dock();
                case "CGovernment":
                case "CMarriage":
                case "CPostOffice":
                case "CHospital":
                case "CPoliceStation":
                case "CChengguan":
                case "CKindergarten":
                case "CLibrary":
                case "CStatium":
                case "CBank":
                case "CSchool":
                case "CCourt":
                case "CMuseum":
                case "CNewspaperOffice":
                case "CRelocationOffice":
                case "CCommunity":
                case "CCentrum":
                case "CMatch":
                case "CDulux":
                case "CParkinglot":
                case "CZhonghuayafangsuo":
                case "CFireDepartment":
                case "CRobotPower":
                    return new InfrastructureInfo();
                case "COilWell":
                    return new OilWellInfo();
                case "CFactory":
                    return new FactoryInfo();
                case "CGray":
                    return new GrayInfo();
                //case "CWarehouse": //仓库
                //case "CHalobios": //海洋馆
                default:
                    return new OtherElement();
            }
        }
    }
}
